﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;

namespace Kimola.Config
{
  /// <summary>
  /// Kimola configuration section class.
  /// </summary>
  internal class KimolaConfigurationSection : ConfigurationSection
  {
    private static ConfigurationProperty api;
    private static ConfigurationProperty document;
    private static ConfigurationPropertyCollection properties;

    static KimolaConfigurationSection()
    {
      KimolaConfigurationSection.api = new ConfigurationProperty("api", typeof(KimolaConfigurationAPIElement), null, ConfigurationPropertyOptions.IsRequired);
      KimolaConfigurationSection.document = new ConfigurationProperty("document", typeof(KimolaConfigurationDocumentElement), null, ConfigurationPropertyOptions.IsRequired);

      KimolaConfigurationSection.properties = new ConfigurationPropertyCollection();
      KimolaConfigurationSection.properties.Add(KimolaConfigurationSection.api);
      KimolaConfigurationSection.properties.Add(KimolaConfigurationSection.document);
    }

    [ConfigurationProperty("api", IsRequired = true)]
    internal KimolaConfigurationAPIElement Api { get { return (KimolaConfigurationAPIElement)base[KimolaConfigurationSection.api]; } }

    [ConfigurationProperty("document", IsRequired = true)]
    internal KimolaConfigurationDocumentElement Document { get { return (KimolaConfigurationDocumentElement)base[KimolaConfigurationSection.document]; } }
  }
}